<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>响应式布局</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        html,body{
            height: 100%;
        }
        body{
            background-color: yellow;
        }

        @media screen and (min-width:1000px){
            body{
                background-color: yellow;
            }
        }
        @media screen and (max-width:1000px) and (min-width:500px){
            body{
                background-color: red;
            }
        }
        @media screen and (max-width:500px){
            body{
                background-color: green;
            }
        }
    </style>
</head>
<body>
    
</body>
</html>